import request from '@/plugin/axios'
import { sysPath } from '@api/sys.common'

export function getChannelList(data) {
	return request({
		url: sysPath + '/admin/v1/live/channel/page',
		method: 'post',
		data
	})
}

export function getLiveList(data) {
	return request({
		url: sysPath + '/admin/v1/live/info/page',
		method: 'post',
		data
	})
}

export function addLive(data) {
	return request({
		url: sysPath + '/admin/v1/live/info/add',
		method: 'post',
		data
	})
}

export function editLive(data) {
	return request({
		url: sysPath + '/admin/v1/live/info/edit',
		method: 'post',
		data
	})
}

export function createQRcode(params) {
	return request({
		url: sysPath + '/hx-mart/api/v1/shop/share/miniqrcode',
		method: 'post',
		params
	})
}

export function getCouponPlanList(params) {
	return request({
		url: sysPath + '/admin/v1/live/coupon/plan/list',
		method: 'post',
		params
	})
}

export function addCouponPlan(data) {
	return request({
		url: sysPath + '/admin/v1/live/coupon/distribution/plan/add',
		method: 'post',
		data
	})
}

export function editCouponPlan(data) {
	return request({
		url: sysPath + '/admin/v1/live/coupon/distribution/plan/edit',
		method: 'post',
		data
	})
}
